﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

public partial class Index : HttpMapping
{
    AdminUser adminUser = new AdminUser();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (adminUser.IsLogin())
        {
            ApplyBreadCumb();
            Body.Controls.Add(CreateControl());
        }
        else
        {
            HttpContext.Current.Response.Redirect("~/Admin/Default.aspx");
        }
       
            
    }


    public void ApplyBreadCumb()
    {

        List<UrlItem> urls = new List<UrlItem>();
        UrlItem url = new UrlItem();
        url.Text = "Home";
        url.Url = DoAction.ActionPageView("Home", Action.NONE);
        urls.Add(url);

        string page = GetPage();
        string action = GetAction();
        url.Text = page;
        url.Url = DoAction.ActionPageView(page, action);

        
        Breadcumb1.Breadcumb = urls;
    }
    
  
   

    
}
